<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Alexa Auto SDK: com.amazon.aace.alexa.AuthProvider Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="aace-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Alexa Auto SDK
   &#160;<span id="projectnumber">2.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>com</b></li><li class="navelem"><b>amazon</b></li><li class="navelem"><b>aace</b></li><li class="navelem"><b>alexa</b></li><li class="navelem"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider.html">AuthProvider</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">com.amazon.aace.alexa.AuthProvider Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_error.html">AuthError</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_state.html">AuthState</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aeedf509b073beea5fd1bf29a170e1c57"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider.html#aeedf509b073beea5fd1bf29a170e1c57">getAuthToken</a> ()</td></tr>
<tr class="separator:aeedf509b073beea5fd1bf29a170e1c57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa04277b311b61fdcf18c759714d148b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_state.html">AuthState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider.html#aa04277b311b61fdcf18c759714d148b1">getAuthState</a> ()</td></tr>
<tr class="separator:aa04277b311b61fdcf18c759714d148b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73c6d42ae6537e38fa7a910cf84e5b8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider.html#a73c6d42ae6537e38fa7a910cf84e5b8a">authFailure</a> (String token)</td></tr>
<tr class="separator:a73c6d42ae6537e38fa7a910cf84e5b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae41d2954a60f8ec802e8784d1963f3eb"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider.html#ae41d2954a60f8ec802e8784d1963f3eb">authStateChange</a> (<a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_state.html">AuthState</a> authState, <a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_error.html">AuthError</a> authError)</td></tr>
<tr class="separator:ae41d2954a60f8ec802e8784d1963f3eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider.html">AuthProvider</a> should be extended to manage access tokens for AVS authorization and report client authorization state to the Engine. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aeedf509b073beea5fd1bf29a170e1c57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeedf509b073beea5fd1bf29a170e1c57">&#9670;&nbsp;</a></span>getAuthToken()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">String com.amazon.aace.alexa.AuthProvider.getAuthToken </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the token used by the platform implementation for authorization with AVS. The platform implementation should retrieve an auth token if it does not have one.</p>
<dl class="section return"><dt>Returns</dt><dd>The token used to authorize with AVS </dd></dl>

</div>
</div>
<a id="aa04277b311b61fdcf18c759714d148b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa04277b311b61fdcf18c759714d148b1">&#9670;&nbsp;</a></span>getAuthState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_state.html">AuthState</a> com.amazon.aace.alexa.AuthProvider.getAuthState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the AVS authorization state of the platform implementation</p>
<dl class="section return"><dt>Returns</dt><dd>The AVS authorization state </dd></dl>

</div>
</div>
<a id="a73c6d42ae6537e38fa7a910cf84e5b8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73c6d42ae6537e38fa7a910cf84e5b8a">&#9670;&nbsp;</a></span>authFailure()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.amazon.aace.alexa.AuthProvider.authFailure </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>token</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notifies the platform implementation that the specified access token was used in an unauthorized request to AVS. AVS responded to this request with a 403 code indicating the token was not valid.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">token</td><td>The access token used in an unauthorized request to AVS </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae41d2954a60f8ec802e8784d1963f3eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae41d2954a60f8ec802e8784d1963f3eb">&#9670;&nbsp;</a></span>authStateChange()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.AuthProvider.authStateChange </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_state.html">AuthState</a>&#160;</td>
          <td class="paramname"><em>authState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_auth_provider_1_1_auth_error.html">AuthError</a>&#160;</td>
          <td class="paramname"><em>authError</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notifies the Engine of a change in AVS authorization state in the platform implementation</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">authState</td><td>The new authorization state</td></tr>
    <tr><td class="paramname">authError</td><td>The error state of the authorization attempt </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<html>
  <body>
    <hr style="height:1px;border-width:0;color:gray;background-color:gray">
    <p style="text-align:left;">
      Alexa Auto SDK 2.2.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
      <span style="float:right;">
        Licensed under the <a HREF=http://aws.amazon.com/apache2.0/>Apache License, Version 2.0</a>
      </span>
    </p>
  </body>
</html>
